PEEK
PEEK_W
PEEK_L

Syntax: PEEK (address)  address=0,1,2,3,...
   and: PEEK_W (address)  address=0,2,4,6,...
   and: PEEK_L (address)  address=0,2,4,6,...
Location: QL ROM

These three functions are complementary to POKE, POKE_W and POKE_L - they returnthe value of the byte, word or longword stored at the given address.

NOTE:
Due to the way in which values are stored in memory, it can be difficult to read negative values. However, although PEEK will return an unsigned byte in the range 0..255, PEEK_W will return a signed word in the range -32768...32767 and PEEK_L a signed longword. 

MINERVA NOTES:
As with the POKE commands, the PEEK functions on Minerva (version 1.77 or later) are very much enhanced and different.

Minerva allows you to use PEEK_W and PEEK_L on odd addresses, eg:
PRINT PEEK_W(131073)

Minerva has also added to the usefulness of the PEEK, PEEK_W and PEEK_L functions by allowing them to access system variables, Minerva's System Xtensions and SuperBASIC variables:

(1) Look at SuperBASIC variables.    
PEEK (\\SBvar)    
PEEK_W (\\SBvar)    
PEEK_L (\\SBvar)    
PEEK (\SBvar\Offset)    
PEEK_W (\SBvar\Offset)    
PEEK_L (\SBvar\Offset)

(2) Look at System variables.
PEEK (!!Sysvar)
PEEK_W (!!Sysvar)
PEEK_L (!!Sysvar)
PEEK (!Sysvar!Offset)
PEEK_W (!Sysvar!Offset)
PEEK_L (!Sysvar!Offset)


(3) Look at System Xtensions.
sx_base=PEEK_L(VER$(-2) + 124)
PEEK (sx_base + offset)

SMS NOTES:
SMS has altered the PEEK functions so that they are able to access System variables and SuperBASIC variables, using the same format as Minerva.

CROSS-REFERENCE:
Please see in particular POKE, POKE_W, and POKE_L.
PEEK$ reads a string stored in memory and contains some examples of the new variants introduced on Minerva and SMS.
PEEK_F and PEEKS are also worth a look.
